package com.vincent.war.controller;

import com.vincent.war.config.AppConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class WarController {
    @Autowired
    private AppConfig config;
    @GetMapping("/hello")
    public String hello(){
        return "hello "+config.getName();
    }
}
